<?php

/*
 * This file is part of the symfony package.
 * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * sfWidgetFormSelectCheckbox represents an array of checkboxes.
 *
 * @package    symfony
 * @subpackage widget
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: sfWidgetFormSelectCheckbox.class.php 27738 2010-02-08 15:07:33Z Kris.Wallsmith $
 */
class sfWidgetFormSelectCheckbox2 extends sfWidgetFormSelectCheckbox
{

 /**
   * Renders a HTML content tag.
   * Corrected. ul and li doesn't need all the inputs attributes.
   *
   * @param string $tag         The tag name
   * @param string $content     The content of the tag
   * @param array  $attributes  An array of HTML attributes to be merged with the default HTML attributes
   *
   * @param string An HTML tag string
   */
  public function renderContentTag($tag, $content = null, $attributes = array())
  {
    if (empty($tag))
    {
      return '';
    }
	if($tag=='li' or $tag=='ul'){
		$htmlAttributes = implode('', array_map(array($this, 'attributesToHtmlCallback'), array_keys($attributes), array_values($attributes)));
	}else{
		$htmlAttributes = $this->attributesToHtml($attributes);
	}
	return sprintf('<%s%s>%s</%s>', $tag, $htmlAttributes, $content, $tag);
    
  }  
}

